<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>list users</title>
</head>
<body>
	
<c:if  test="${!empty usersInfoList}">
<table width="100%" height="100%" class="sortable" cellspacing="4">
	<tr>
		<td width="150">E-mail</td>
		<td width="150">Imie</td>
		<td width="150">Nazwisko</td>
		<td width="60">Grupa</td>
		<td width="150">Data ur.</td>
		<td width="150">Miasto</td>
		<td>Wydruk Szkolenia</td>

	</tr>
<c:forEach items="${usersInfoList}" var="userInfo">
	<tr>
		<td>${userInfo.username}</td>
		<td>${userInfo.firstname}</td>
		<td>${userInfo.lastname}</td>
		<td>${userInfo.groupid}</td>
		<td>${userInfo.birthdate}</td>
		<td>${userInfo.city}</td>
		<td>
			<table border="1">
				<tr>
					<c:forEach items="${userInfo.userCourseInfo}" var="userCourseInfo">
					<c:if test="${userCourseInfo.starttest_done==true}">
						<td>Szk. ${userCourseInfo.course.course_id}<br/>
						<span style="font-size: 9px; cursor: pointer;"
						onclick="window.open('<%= request.getContextPath() %>/resources/eCoursePrint/eCoursePrint.html?course_id=${userCourseInfo.course.course_id}&username=${userCourseInfo.username}&type=PRZED&print=yes','Test przed','width=800,height=600,scrollbars=1')"
						>przed</span> |
						<span style="font-size: 9px; cursor: pointer;"
						onclick="window.open('<%= request.getContextPath() %>/resources/eCoursePrint/eCoursePrint.html?course_id=${userCourseInfo.course.course_id}&username=${userCourseInfo.username}&type=PO&print=yes','Test po','width=800,height=600,scrollbars=1')"
						>po</span>
						</td>
					</c:if>
					</c:forEach>
				</tr>
			</table>
		</td>
	</tr>
</c:forEach>
</table>
</c:if>
